FROM registry.k8s.cloud/cloud-monitor/service_base:1.3.4

COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

WORKDIR /service
COPY ./conf/logrotate/app /etc/logrotate.d/app
COPY run.py start.sh uwsgi.ini manage.py ./
COPY ./app ./app
RUN chmod +x ./start.sh \
    && touch uwsgi-logreopen.touch \
    && chmod 644 /etc/logrotate.d/app

ENTRYPOINT ["./start.sh"]
